<template>
  <NvCrud :option :data />
</template>

<script setup lang="tsx">
import type { NvCrudOption } from 'nv-crud'
import { NGradientText } from 'naive-ui'
import { NvCrud } from 'nv-crud'

const data = [{ name: '张三', sex: '男', age: 18 }]

const option: NvCrudOption = {
  rowActions: false,
  actionbar: false,
  toolbar: false,
  fields: {
    name: {
      title: () => <NGradientText size={24} type="danger">姓名</NGradientText>,
    },
    sex: {
      title: () => <NGradientText size={20} type="info">性别</NGradientText>,
    },
    age: {
      title: () => <NGradientText size={16} type="warning">年龄</NGradientText>,
    },
  },
}
</script>
